package third;

 class Superclass {
    String name = "Superclass";
    void func()
    {
        System.out.println("asd");
    }
}

class Subclass extends Superclass {
    String name = "Subclass";
    void func()
    {
        System.out.println("qwe");
    }
}

public class test03 {
    public static void main(String[] args) {
        Subclass s = new Subclass();
        System.out.println(s.name);  // This will print "Subclass"

        Superclass sc = new Subclass();
        sc.func();
        System.out.println(sc.name);  // This will print "Superclass"
    }
}